In the case there are more search results present than there's space for
it, always display a scrollbar. Some QtQuick themes don't make it
obvious that the list is scrollable.
Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
id: suggestionsPopup
width: root.width
- height: 100
y: root.height
contentItem: ScrollView {
clip: true
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
+ ScrollBar.vertical.policy: shareeListView.contentHeight > shareeListView.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff
+
+ // need to take the popup's padding in account for the max height
+ // remove bottomPadding twice to leave some space between the window border
+ implicitHeight: Math.min(Window.height - parent.y - parent.topPadding - parent.bottomPadding * 2, contentHeight)
ListView {
id: shareeListView